package cn.wolfcode.crm.mapper;

import cn.wolfcode.crm.domain.SpendPointItem;
import cn.wolfcode.crm.query.ClientChartQueryObject;
import cn.wolfcode.crm.query.SpendPointQueryObject;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import java.util.Map;

public interface SpendPointItemMapper {
    int deleteByPrimaryKey(Long id);

    int insert(SpendPointItem record);

    SpendPointItem selectByPrimaryKey(Long id);

    List<SpendPointItem> selectAll(Long parentId);

    int updateByPrimaryKey(SpendPointItem record);

    SpendPointItem selectByName(String name);

    List<SpendPointItem> selectExportData(SpendPointQueryObject qo);

    //查询本日明细总额
    BigDecimal selectAmountByDay(Date date);

    //查询本月支出明细总额
    BigDecimal selectAmountByMouth(Map<String, Date> dates);

    //查询累计支出金额
    BigDecimal selectAllAmount();

    int selectSpendTimes();

    List<SpendPointItem> querybyDate(SpendPointQueryObject qo);

    BigDecimal queryAvgSpend();

    BigDecimal queryMaxSpend();

    List<Map<String,Object>> itmes(SpendPointQueryObject qo);

    List<Map<String,Object>> zitems(SpendPointQueryObject qo);
}